import Vue from 'vue'
import Router from 'vue-router'
import store from '../vuex/index'
Vue.use(Router)

let router = new Router({
	routes: [
		{
			path: '/',
			component: resolve => {
          require(['../view/home.vue'], res => {
              resolve(res)
          })
      }
    },
		{
			path: '/home',
			name: 'home',
			component: resolve => {
          require(['../view/home.vue'], res => {
              resolve(res)
          })
      }
		}
	]
})

router.beforeEach((to, from, next) => {
	next();
})
router.afterEach((to, from, next) => {
})

export default router
